export default function useImpCpts() {
  const cpts: Record<string, any> = {};
  const modules: any = import.meta.glob("../components/*/index.vue", {
    eager: true
  });

  Object.keys(modules).forEach(key => {
    const folderName = key.match(/\/components\/([^\/]*)\//)?.[1];
    if (folderName) {
      cpts[folderName] = modules[key].default;
    }
  });

  return { cpts, modules };
}
